﻿// copyright (c) 2025 author:fio66<fio66@foxmail.com>. All rights reserved.
// date: 2025-08-22 17:41:20

#ifndef _AUDIO_PLAYER_SRC_EVENT_EVENT_HANDLER_H_
#define _AUDIO_PLAYER_SRC_EVENT_EVENT_HANDLER_H_
#include <any>

namespace fio66 {

enum class EventType {
  kNone,
  kPlay,
  kPause,
  kStop,
  kSeek,
  kVolume,
  kSpeed,
  kFullscreen,
  kMute,
  kError,
  kEnd,
};

class EventDispatcher;

class EventHandler {
 public:
  EventHandler(EventDispatcher *dispater) : dispatcher_(dispater) {}
  virtual ~EventHandler() = default;
  virtual void OnEvent(EventType type, const std::any &data) = 0;

 protected:
  EventDispatcher *dispatcher_;
};
}  // namespace fio66

#endif  // _AUDIO_PLAYER_SRC_EVENT_EVENT_HANDLER_H_
